<?php
/**
 * Copyright 2012  SURFfoundation
 * 
 * This file is part of ESCAPE.
 * 
 * ESCAPE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ESCAPE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ESCAPE.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information:
 * http://escapesurf.wordpress.com/
 * http://www.surffoundation.nl/
 * 
 * Contact: d.vierkant@utwente.nl
 * 
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3
 */
?>
<?php
/**
 * ORE object
 * 
 * Shared code for OAI ORE objects.
 */
abstract class escape_repository_OreObject extends escape_repository_DataObject
{
	public function __construct(&$repository, $uri, $rdfResource = null, $noIndex = false, $allowDeleted = false)
	{
		parent::__construct($repository, $uri, $rdfResource, $noIndex, $allowDeleted);
	}

	/**
	 * Fetches the ID for this data object (the PID without the namespace part). 
	 * @return string ID
	 */
	public function getId()
	{
		return $this->repository->convertObjectUriToDataObjectId($this->uri);
	}
	
	/**
	 * Fetches the aggregation for this object.
	 * @return escape_repository_OreAggregation Aggregation
	 */
	abstract public function &getAggregation();
}
